Conventionally, there have been storage devices which have a function to encrypt data. A cryptographic key is used in encrypting data. When data in the storage device is being discarded, the cryptographic key is changed. Changing the cryptographic key can make the data unusable more quickly than erasing the data itself.